<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            background-color: green;
            width: 120px;
            height: 50px;
            padding: 40px;
            color: #ffffff;
        }
    </style>
    <script>
        function mOver(obj) {
            obj.innerHTML = "我猜你把鼠标移上来了";
        }

        function mOut(obj) {
            obj.innerHTML = "我猜你把鼠标移开了";
        }
    </script>
</head>
<body>
<div onmouseover="mOver(this)" onmouseout="mOut(this)">
    把鼠标移动到我上面，然后在移开，有惊喜
</div>
</body>
</html>